<?php
/**
 * Created by PhpStorm.
 * User: FDG296
 * Date: 2017/8/2
 * Time: 16:42
 */
namespace common\models;

use Yii;
use yii\db\ActiveRecord;

class GoodsTag extends ActiveRecord{
	const USE_FLG_YES 	= 1;
	const USE_FLG_NO 	= 0; //禁用
    public static function tableName(){
        return '{{%goods_tag}}';
    }

	public static function getGoodsTagOne($id){
		return self::find()->where([
			'use_flg'	=>self::USE_FLG_YES,
			'id'		=>$id
		])->one();
	}
}